<%@ page import="com.oriental.manage.core.enums.CompanyType" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags/form" %>
<%--
  User: Yangxp
  Date: 2016/5/19
  Time: 9:31
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/taglibs.jsp" %>
<html>
<head>
    <title>Title</title>
    <script src="${ctx}/js/views/specially/searchEnterpriseMchntBaseInfo.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">

<core:import url="../common/pageHead.jsp">
    <core:param name="title" value="企业商户信息上报 "/>
</core:import>

<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/specialMerchant/enterpriseMchntInfo/search"   autocomplete="off">
        <table class="table table-bordered">
            <tr>
                <td class="text-right">
                    商户代码：
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.cusCode" placeholder="根据简称获取商代码" class="{{vm.constant.inputClass}}"
                           typeahead-min-length="0"   uib-typeahead="item.key as item.value for item in vm.getCache('MERCHANT_CODE') | filter:$viewValue | limitTo:10"/>
                </td>
                <td class="text-right">
                    商户状态：
                </td>
                <td>
                    <select ng-model="vm.queryBean.status" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in vm.cache.MERCHANT_STATUS">
                        <option value="">请选择</option>
                    </select>
                </td>

                <td class="text-right">
                    商户全称：
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.regName" placeholder="支持模糊查询" class="{{vm.constant.inputClass}}"
                           typeahead-min-length="0"   uib-typeahead=" item.value as item.value  for item in vm.getCache('MERCHANT_CODE') | filter:$viewValue | limitTo:10"/>
                </td>.
                <td class="text-right">
                    商户在协会状态：
                </td>
                <td>
                    <select ng-model="vm.queryBean.centerStatus" class="{{vm.constant.inputClass}}"
                            ng-options="key as value for (key,value) in {'00':'未上报','01':'已上报','02':'已删除'}">
                        <option value="">请选择</option>
                    </select>
                </td>
            </tr>
            <tr align="center">
                <td colspan="8">
                    <button type="button" ng-click="vm.queryDetail()" class="btn btn-default">查询</button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                </td>
            </tr>
        </table>
    </form>

    <div>

        <table table-detail>
            <thead>
            <tr>
                <%--<th>--%>
                    <%--<input type="checkbox" name="checkAll">--%>
                <%--</th>--%>
                <th>商户代码</th>
                <th>商户类型</th>
                <th>商户名称</th>
                <th>商户状态</th>
                <th>商户上线日期</th>
                <th>报送次数</th>
                <th>商户在协会状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody ng-repeat="bean in vm.pagination.list ">
            <tr>
                <%--<td>--%>
                    <%--<input name="check" type="checkbox" ng-click="vm.updateChecked($event, bean.id)">--%>
                <%--</td>--%>
                <td>{{bean.cusCode}}</td>
                <td>{{vm.cache.MERCHANT_TYPE[bean.cusType]}}</td>
                <td>{{bean.regName}}</td>
                <td>{{vm.cache.MERCHANT_STATUS[bean.status]}}</td>
                <td>{{bean.startTime| date:'yyyy-MM-dd'}}</td>
                <td>{{bean.note}}</td>
                <td>{{{'00':'未上报','01':'已上报','02':'已删除'}[bean.centerStatus]}}</td>
                <td>
                    <button ng-click="vm.updateItem(bean.cusCode)">编辑上报</button>
                    <button ng-click="vm.uploadDetail(bean.cusCode,bean.note)">查看上报详情</button>
                </td>
            </tr>
            </tbody>

        </table>
    </div>

    <core:import url="../common/pageFoot.jsp"/>
</div>
<core:import url="../common/nav.jsp"/>
</body>
</html>
